package algorithms.que14;

import org.springframework.http.converter.json.GsonBuilderUtils;

/**
 * @功能
 * @创建时间 2020/8/18
 */
public class ThreeSum {
    public static int count(int[ ] a){
        new Thread(()-> System.out.println(0));

        int N=a.length;
        int cnt=0;
        long emp=0;
        long a1;
        long b;
        for (int i=0;i<N;i++)
            for (int j=i+1;j<N;j++)
                for(int k=j+1;k<N;k++)
                {   a1=a[i];
                    b=a[j];
                    emp=a[i]+a[j];
                    if(emp==-a[k ]){
                        cnt++;
                    }
                }
                return cnt;
    }
}
